// an array--collection of values, all of which are the same type

var aArray = new Array( 5 );

for( var i = 0; i < aArray.length; i = i + 1 )
{
	aArray[ i ] = 0
}

function showImage( nIndex )
{
	aArray[ nIndex ] = aArray[ nIndex ] + 1;
}
			
			function showEgyptMap()
			{
				aArray[ 0 ] = aArray[ 0 ] + 1;
				document.getElementById( "picture" ).src = "images/Egypt_Map.gif";
				document.getElementById( "picture" ).alt = "This is a map of Egypt.";	
				document.getElementById( "picture" ).title = "This is a map of Egypt.";				
				document.getElementById( "picture02" ).src = "images/Egypt_Flag.gif";
				document.getElementById( "picture02" ).alt = "This is the Flag of Egypt.";	
				document.getElementById( "picture02" ).title = "This is the Flag of Egypt.";
				document.getElementById( "caption" ).innerHTML = "<center>This is the Country of Egypt and their Flag.<br>It is located in the Northeast section of the Continent. Click the map to learn more.</center>";
			}

			function showKenyaMap()
			{
				aArray[ 1 ] = aArray[ 1 ] + 1;
				document.getElementById( "picture" ).src = "images/Kenya_Map.gif";
				document.getElementById( "picture" ).alt = "This is a map of Kenya.";	
				document.getElementById( "picture" ).title = "This is a map of Kenya.";				
				document.getElementById( "picture02" ).src = "images/Kenya_Flag.gif";
				document.getElementById( "picture02" ).alt = "This is the Flag of Kenya.";	
				document.getElementById( "picture02" ).title = "This is the Flag of Kenya.";
				document.getElementById( "caption" ).innerHTML = "<center>This is the Country of Kenya and their Flag. <br>It is located in the Eastern Central section of the Continent. Click the map to learn more.</center>";
			}

			function showMoroccoMap()
			{
				aArray[ 2 ] = aArray[ 2 ] + 1;
				document.getElementById( "picture" ).src = "images/Morocco_Map.gif";
				document.getElementById( "picture" ).alt = "This is a map of Morocco.";	
				document.getElementById( "picture" ).title = "This is a map of Morocco.";				
				document.getElementById( "picture02" ).src = "images/Morocco_Flag.gif";
				document.getElementById( "picture02" ).alt = "This is the Flag of Morocco.";	
				document.getElementById( "picture02" ).title = "This is the Flag of Morocco.";
				document.getElementById( "caption" ).innerHTML = "<center>This is the Country of Morocco and their Flag. <br>It is located in the Northwest section of the Continent. Click the map to learn more.</center>";
			}

			function showNigeriaMap()
			{
				aArray[ 3 ] = aArray[ 3 ] + 1;
				document.getElementById( "picture" ).src = "images/Nigeria_Map.gif";
				document.getElementById( "picture" ).alt = "This is a map of Nigeria.";	
				document.getElementById( "picture" ).title = "This is a map of Nigeria.";				
				document.getElementById( "picture02" ).src = "images/Nigeria_Flag.gif";
				document.getElementById( "picture02" ).alt = "This is the Flag of Nigeria.";	
				document.getElementById( "picture02" ).title = "This is the Flag of Nigeria.";
				document.getElementById( "caption" ).innerHTML = "<center>This is the Country of Nigeria and their Flag. <br>It is located in the Western Central section of the Continent. Click the map to learn more.</center>";
			}

			function showZambiaMap()
			{
				aArray[ 4 ] = aArray[ 4 ] + 1;
				document.getElementById( "picture" ).src = "images/Zambia_Map.gif";
				document.getElementById( "picture" ).alt = "This is a map of Zambia.";	
				document.getElementById( "picture" ).title = "This is a map of Zambia.";				
				document.getElementById( "picture02" ).src = "images/Zambia_Flag.gif";
				document.getElementById( "picture02" ).alt = "This is the Flag of Zambia.";	
				document.getElementById( "picture02" ).title = "This is the Flag of Zambia..";
				document.getElementById( "caption" ).innerHTML = "<center>This is the Country of Zambia and their Flag. <br>It is located in the Southern Central section of the Continent. Click the map to learn more.</center>";
			}
			
			function showCounter()
			{
					
				if( aArray[ 0 ] > 0 && aArray[ 1 ] > 0 && aArray[ 2 ] > 0 
						&& aArray[ 3 ] > 0 && aArray[ 4 ] > 0 )
				{
					alert( "CONGRATULATIONS! " + aArray);
					window.location = "http://www.africaguide.com/embassy.htm"	;
				}
				else
				{
					alert( "YOU DID NOT FINISH" );
				}
			}			